home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / mactool / eventest.cpt / Apple® Event Tester v 1.0 / stack.txt < prev    next >
Encoding:
Text File  |  1992-10-02  |  6.1 KB  |  227 lines

  1. -- stack: in.0
  2. -- format: 10 (HyperCard 2)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=16, y1=43, x2=528, y2=385)
  7. -- screen: Rect(x1=0, y1=0, x2=1152, y2=882)
  8. -- card dimensions: w=512 h=342
  9. -- scroll: x=0 y=0
  10. -- background count: 1
  11. -- first background id: 2582
  12. -- card count: 1
  13. -- first card id: 2910
  14. -- list block id: 2169
  15. -- print block id: 0
  16. -- font table block id: 3410
  17. -- style table block id: 3095
  18. -- free block count: 5
  19. -- free size: 39680 bytes
  20. -- total size: 57344 bytes
  21. -- stack block size: 5632 bytes
  22. -- created by hypercard version: 0x02108000
  23. -- compacted by hypercard version: 0x02108000
  24. -- modified by hypercard version: 0x02108000
  25. -- opened by hypercard version: 0x02108000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0xDC919C69
  67. ----- HyperTalk script -----
  68. on mouseWithin
  69.   get word 1 to 2 of the target&&number of the target
  70.   FullBalloons "IsShowing"
  71.   if not the Result and it Γëá the selectedField then send mouseEnter to the target
  72. end mouseWithin
  73.  
  74. function AESendMode
  75. put 0 into sMode
  76. repeat with i = 1 to the paramCount
  77.   put param(i) into thisParam
  78.   if thisParam = "noReply" then
  79.     add 1 to sMode
  80.   else if thisParam = "waitReply" then
  81.     add 3 to sMode
  82.   else if thisParam = "NeverInteract" then
  83.     add 16 to sMode
  84.   else if thisParam = "CanInteract" then
  85.     add 32 to sMode
  86.   else if thisParam = "AlwaysInteract" then
  87.     add 48 to sMode
  88.   end if
  89.   -- not done yet, need to add more constants
  90. end repeat
  91. return sMode
  92. end AESendMode
  93.  
  94. function exmn
  95. return "├ªexmn├ª0"
  96. end exmn
  97.  
  98. function NullDesc
  99. return "├ªnull├ª0"
  100. end nullDesc
  101.  
  102. function AEChunk objectName, form, data
  103. put the paramCount into n
  104. if n > 3 then
  105.   put objectName & Object & "(form, data" into stmt
  106.   put ")" into ending
  107.   put 4 into i
  108.   repeat while n >= i
  109.     put "," & param(i) & "Object(" & param(i+1) & ",param(" & i+2 & ")" after stmt
  110.     put ")" after ending
  111.     add 3 to i
  112.   end repeat
  113.   put ending after stmt
  114. else
  115.   put objectName & Object & "(form, data)" into stmt
  116. end if
  117. return value of stmt
  118. end AEChunk
  119.  
  120. function AEPropertyOfChunk property, objectName, form, data
  121. put the paramCount into n
  122. if n > 4 then
  123.   put objectName & "Property" & "(property, form, data" into stmt
  124.   put ")" into ending
  125.   put 5 into i
  126.   repeat while n >= i
  127.     put "," & param(i) & "Object(" & param(i+1) & ",param(" & i+2 & ")" after stmt
  128.     put ")" after ending
  129.     add 3 to i
  130.   end repeat
  131.   put ending after stmt
  132. else
  133.   put objectName & "Property" & "(property, form, data)" into stmt
  134. end if
  135. return value of stmt
  136. end AEPropertyOfChunk
  137.  
  138. function AEAndTest
  139. put the params into x
  140. put offset("(", x) into n
  141. put "AELogicSpec(" & quote & "AND " & quote & "," into char 1 to n of x
  142. return value(x)
  143. end AEAndTest
  144.  
  145. function AEAndTest
  146. put the params into x
  147. put offset("(", x) into n
  148. put "AELogicSpec(" & quote & "OR  " & quote & "," into char 1 to n of x
  149. return value(x)
  150. end AEAndTest
  151.  
  152. function AENotTest
  153. put the params into x
  154. put offset("(", x) into n
  155. put "AELogicSpec.(" & quote & "NOT " & quote & "," into char 1 to n of x
  156. return value(x)
  157. end AENotTest
  158.  
  159. on AEHandleError errorString
  160.   answer errorString with debug or continue or cancel
  161.   if it is cancel then
  162.     exit to hypercard
  163.   else if it is debug then
  164.     debug checkpoint
  165.   end if
  166. end AEHandleError
  167.  
  168. on AEFreeUnusedDesc
  169.   global createdDesc
  170.   put number of items in createdDesc into n
  171.   repeat n times
  172.     AEDisposeDesc item 1 of createdDesc
  173.   end repeat
  174. end AEFreeUnusedDesc
  175.  
  176. on AEStartTargeting appName,launching
  177.   global curTargetApp
  178.   put AEKeepDesc(AECreateDesc("targ","targ",appName)) into x
  179.   if (char 1 to 6 of x = "├ånull├å") or (char 1 to 6 of x = "├åerro├å") then
  180.     if (launching = "") or (launching = "true") then
  181.       open appName
  182.       put AEKeepDesc(AECreateDesc("targ","targ",appName)) into x
  183.     end if
  184.     if (char 1 to 6 of x = "├ånull├å") or (char 1 to 6 of x = "├åerro├å") then put appName into x
  185.   end if
  186.   put x & return before curTargetApp
  187. end AEStartTargeting
  188.  
  189. on AEStopTargeting
  190.   global curTargetApp
  191.   put line 1 of curTargetApp into x
  192.   delete line 1 of curTargetApp
  193.   AEDisposeDesc(x)
  194. end AEStopTargeting
  195.  
  196. on MakeSureLaunched appName
  197.   if appName is not in the programs then
  198.     open appName
  199.   end if
  200. end MakeSureLaunched
  201.  
  202. function AELongType data
  203. return AECreateDesc("long","long",data)
  204. end AELongType
  205.  
  206. function AEShortType data
  207. return AECreateDesc("shor","shor",data)
  208. end AEShortType
  209.  
  210. function AEBooleanType data
  211. return AECreateDesc("bool","bool",data)
  212. end AEBooleanType
  213.  
  214. function AEPointType hPos, vPos
  215. return AECreateDesc("QDpt","QDpt",hPos & "," & vPos)
  216. end AEPointType
  217.  
  218. function AERectangleType left,top,right,bottom
  219. return AECreateDesc("qdrt","qdrt",left & "," & top & "," & right & "," & bottom)
  220. end AERectangleType
  221.  
  222. function AEExtendedType data
  223. return AECreateDesc("exte","exte",data)
  224. end AEExtendedType
  225.  
  226.  
  227.